package com.sf.fy.uav.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sf.fy.uav.common.request.common.IdRequest;
import com.sf.fy.uav.common.request.operate.SysBannerAddRequest;
import com.sf.fy.uav.common.request.operate.SysBannerEditRequest;
import com.sf.fy.uav.common.request.operate.SysBannerRequest;
import com.sf.fy.uav.common.request.order.DealRequest;
import com.sf.fy.uav.common.response.operational.BannerResponse;
import com.sf.fy.uav.common.response.operational.SysBannerResponse;
import com.sf.fy.uav.entity.Banner;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author LTQ
 * @since 2023-06-28
 */
public interface IBannerService extends IService<Banner> {

    /**
     * 查询总条数
     *
     * @param name
     * @param status
     * @return
     */
    Long getTotal(String name, Integer status);

    /**
     * 查询banners
     *
     * @param sysBannerRequest
     * @return
     */
    List<SysBannerResponse> getBanners(SysBannerRequest sysBannerRequest);

    /**
     * 查询banners
     *
     * @return
     */
    List<BannerResponse> getBanners();


    /**
     * 下架
     *
     * @param dealRequest
     */
    void off(@RequestBody DealRequest dealRequest);

    /**
     * 启用
     *
     * @param idRequest
     * @return
     */
    Integer start(@RequestBody IdRequest idRequest);

    /**
     * 结束
     *
     * @param idRequest
     * @return
     */
    Integer end(@RequestBody IdRequest idRequest);

    /**
     * 删除
     *
     * @param dealRequest
     */
    void delete(@RequestBody DealRequest dealRequest);

    /**
     * 通过id获取
     *
     * @param bannerId
     * @return
     */
    SysBannerResponse getById(@RequestParam String bannerId);
}
